﻿@model IEnumerable<Weapsy.Reporting.Apps.ModuleTypeControlPanelModel>

@if (User.IsInRole("Administrator"))
{
    @await Html.PartialAsync("_AdminLoading")

    <link rel="stylesheet" href="~/css/control-panel.css" />

    <div id="control-panel" class="clearfix">
        <div class="container">
            <p class="help">Drag and drop modules into page zones</p>
            <ul class="list-group">
                @foreach (var moduleType in Model)
                {
                    <li id="@moduleType.Id" class="list-group-item moduleType" data-module-type-id="@moduleType.Id" data-module-type-title="@moduleType.Title">
                        <span class="glyphicon glyphicon-option-vertical handle" aria-hidden="true"></span>
                        <span>@moduleType.Title</span>
                    </li>
                }
            </ul>            
            @*<a href="@Url.Action("Index", "Home", new {area = "Admin"})" title="Admin">Admin</a>*@
        </div>
    </div>

    @*<div id="moduleTypes" class="panel panel-default moduleTypes" style="display: none;">
        <div class="panel-heading">
            <span class="glyphicon glyphicon-option-vertical handle" aria-hidden="true"></span>
            <span>Modules</span>
            <a id="restorePosition" href="#" title="Restore Position">
                <span class="glyphicon glyphicon-repeat pull-right" aria-hidden="true"></span> 
            </a>                 
        </div>
        <div class="panel-body">
            <p>Drag and drop modules into page zones</p>
            <ul class="list-group">
                @foreach (var moduleType in Model)
                {
                    <li id="@moduleType.Id" class="list-group-item moduleType" data-module-type-id="@moduleType.Id" data-module-type-title="@moduleType.Title">
                        <span class="glyphicon glyphicon-option-vertical handle" aria-hidden="true"></span>
                        <span>@moduleType.Title</span>
                    </li>
                }
            </ul>
        </div>
    </div>*@
}

@*<div>
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#Modules" data-toggle="tab">Modules</a>
        </li>
    </ul>
    <div class="tab-content">
        <div id="Modules" class="tab-pane active">
            @foreach (var moduleType in Model)
            {
                <div class="panel panel-default text-center moduleType" data-module-type-id="@moduleType.Id" data-module-type-title="@moduleType.Title">
                    <div class="panel-body">@moduleType.Title</div>
                </div>
            }
        </div>
    </div>
</div>*@